﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Info.Master" AutoEventWireup="true" CodeBehind="Info.aspx.cs" Inherits="BBPA.Admin.Sys.Orders.Info" %>

<%@ MasterType VirtualPath="~/Info.Master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style>
        .infoTable, .minWidth { min-width: 350px; }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cph_main" runat="server">

    <table class="infoTable">
        <tr id="tr_StoreName" runat="server">
            <td class="td_title">孕婴店</td>
            <td class="nowrap"><%=modelV_Orders.StoreName %> <%=modelV_Orders.StoreProvince %> <%=modelV_Orders.StoreCity %> <%=modelV_Orders.StoreArea %></td>
        </tr>
        <tr class=" <%=OrderState<=EnumHelper.OrdersState.Buying?"":"hide" %>">
            <td class="td_title">采购日期</td>
            <td class="nowrap"><%=Convert.ToDateTime( modelV_Orders.ExpectBuyDate).ToShortDateString() %></td>
        </tr>
        
    </table>
    <table class="infoTable haveBorder">
        <tr>
            <th></th>
            <th id="th_Price" runat="server"><%=BBPA.Admin.Security.GetCurrentUserType() != EnumHelper.UserType.Store?"孕婴店购买价格":"价格" %></th>
            <th id="th_BuyPrice" runat="server">联盟采购价格</th>
            <th id="th_Pay" runat="server">现金支付</th>
        </tr>
        <tr>
            <td class="td_title">预定:</td>
            <td class="center" id="td_ExpectPrice" runat="server">
               <%=StringPlus.showMoney_empty(BBPA.BLL.Orders.Get_Orders_ExpectSellPriceSum(modelV_Orders.id)+100) %> </td><%-- <%=StringPlus.showMoney_empty(BBPA.BLL.Orders.Get_Orders_ExpectSellPriceSum(modelV_Orders.id)) %>   StringPlus.showMoney_empty(OrderState<EnumHelper.OrdersState.GetMoney?BBPA.BLL.Orders.Get_Orders_ExpectSellPriceSum(modelV_Orders.id) :modelV_Orders.ExpectPriceSum)--%>
            <td class="center" id="tb_ExpectBuyPrice" runat="server">
                <%=StringPlus.showMoney_empty(OrderState<EnumHelper.OrdersState.Buying?BBPA.BLL.Orders.Get_Orders_ExpectBuyPriceSum(modelV_Orders.id):modelV_Orders.ExpectBuyPriceSum) %></td>
            <td class="center" id="tb_ExpectPay" runat="server">
                <%=StringPlus.showMoney_empty(OrderState<EnumHelper.OrdersState.Buying?BBPA.BLL.Orders.Get_Orders_ExpectPay(modelV_Orders.id):modelV_Orders.ExpectPay) %></td>
        </tr>
        <tr>
            <td class="td_title"><asp:Label runat="server" ID="lblshowtxt" Text="需打款:"></asp:Label></td>
            <td class="center" colspan="3">
              <asp:Label runat="server" ID="needmoney" Text=""></asp:Label> </td>
        </tr>
        <tr class="<%=OrderState<EnumHelper.OrdersState.Buying?"hide":"" %>" >
            <td class="td_title">实际</td>
            <td class="center" id="td_ActualPrice" runat="server"><%=StringPlus.showMoney(modelV_Orders.ActualPriceSum) %></td>
            <td class="center" id="tb_ActualPrice" runat="server"><%=StringPlus.showMoney(modelV_Orders.ActualBuyPriceSum) %></td>
            <td class="center" id="tb_ActualPay" runat="server"><%=StringPlus.showMoney(modelV_Orders.ActualPay) %></td>
        </tr>
    </table>
    <table class="infoTable haveBorder <%=OrderState<EnumHelper.OrdersState.HasSend?"hide":"" %>">
    <tr class=" nowrap">
            <td class="td_title">物流公司</td>
            <td><%=modelV_Orders.ExpressName %></td>
        <td class="td_title">运单号</td>
            <td><%=modelV_Orders.ExpressNumber %></td>
        <td class="td_title">运费</td>
            <td><%=StringPlus.showMoney( modelV_Orders.ExpressPrice) %></td></tr>
        <tr>
        <td class="td_title">联系方式</td>
            <td colspan="5"><%=modelV_Orders.ExpressMobile %> <%=modelV_Orders.ExpressTel %></td>
        </tr>
        </table>
    <table class="infoTable haveBorder <%=OrderState<EnumHelper.OrdersState.GetMoney?"hide":"" %>">
        <tr>
            <td class="td_title">订单状态</td>
            <td>
                <table class="noBorder">
                <asp:Repeater ID="rp_Orders_State_Log" runat="server">
                    <ItemTemplate>
                       <tr><td style="padding-right:10px;" valign="top"><%#EnumHelper.GetEnumDescription((EnumHelper.OrdersState) Eval("State")) %></td>
                           <td><%#Eval("Dateandtime") %><div><%#(int)Eval("State")==(int)EnumHelper.OrdersState.BuyPause? Eval("Description"):"" %></div></td></tr>
                    </ItemTemplate>
                </asp:Repeater>
                    </table>
            </td>
        </tr>
    </table>


    <asp:Repeater ID="rp_Goods" runat="server" OnItemDataBound="rp_Goods_ItemDataBound" Visible="false">
        <HeaderTemplate>
            <table class="infoTable haveBorder">
                <thead>
                    <tr>
                        <th>货品</th>

                        <th id="th_ExpectPrice" runat="server">预计单价</th>
                        <th id="th_ExpectAmount" runat="server">预计数量</th>
                        <th id="th_ExpectPriceSum" runat="server">预计小计</th>

                        <th id="th_ActualPrice" runat="server">采购单价</th>
                        <th id="th_ActualAmount" runat="server">采购数量</th>
                        <th id="th_ActualPriceSum" runat="server">采购小计</th>
                    </tr>
                </thead>
        </HeaderTemplate>
        <ItemTemplate>
            <tr data-key-id="<%#Eval("GoodsID") %>" data-row-title="<%#Eval("Name") %>">
                <td>
                    <div style="width: 200px"></div>
                    <div style="width: 80px; margin-right: 10px;" class=" inlineblock">
                        <img src="<%#Eval("PicURL") %>" />
                    </div>
                    <div style="min-width: 100px;" class=" inlineblock">
                        <%#Eval("Number") %><br>
                        <div style="line-height: initial;"><%#Eval("BrandName") %> <%#Eval("Name") %></div>
                    </div>

                </td>

                <td id="td_ExpectPrice" runat="server" style="text-align: center"><%#StringPlus.showCoin( Eval("SellPrice")) %></td>
                <td id="td_ExpectAmount" runat="server" style="text-align: center"><%#Eval("ExpectAmount") %></td>
                <td id="td_ExpectPriceSum" runat="server" itemsum="1" class="text-error" style="text-align: center">
                    <%#StringPlus.showCoin( DataTypePlus.requestDecimal(Eval("SellPrice"))*DataTypePlus.requestDecimal(Eval("ExpectAmount")) ) %></td>


                <td id="td_ActualPrice" runat="server" style="text-align: center"><%#StringPlus.showCoin( Eval("ActualPrice")) %></td>
                <td id="td_ActualAmount" runat="server" style="text-align: center"><%#Eval("ActualAmount") %></td>
                <td id="td_ActualPriceSum" runat="server" itemsum="1" class="text-error" style="text-align: center"><%#StringPlus.showCoin( Eval("ActualPriceSum")) %></td>
            </tr>
        </ItemTemplate>
        <FooterTemplate>
            <tr>
                <td></td>
                <td colspan="3" id="td_Orders_ExpcetPriceSum" runat="server">
                    <h3 style="text-align: right;" class="text-error nowrap">预计合计：<asp:Label ID="lb_ExpectPriceSum" runat="server" Text=""></asp:Label></h3>
                </td>
                <td colspan="3" id="td_Orders_ActualPrice" runat="server">
                    <h2 style="text-align: right;" class="text-error nowrap">实际合计：<asp:Label ID="lb_ActualPriceSum" runat="server" Text=""></asp:Label></h2>
                </td>
            </tr>
            </table>
        </FooterTemplate>
    </asp:Repeater>

</asp:Content>


